from http import cookiejar
import urllib3
from urllib import request

loginUrl = "http://hi.baidu.com/motionhouse";
cj = cookiejar.CookieJar();
opener = request.build_opener(request.HTTPCookieProcessor(cj));
request.install_opener(opener);
resp = request.urlopen(loginUrl);   
for index, cookie in enumerate(cj):
    print('[',index, ']',cookie);
    